/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dorian.atomicuml.dao.interfaces;

import com.dorian.atomicuml.orm.Users;
import java.util.List;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author cedric.creusot
 */
@Transactional(propagation= Propagation.REQUIRED)
public interface UserManager {
    public void createUser(String firstName, 
                           String lastName,
                           String password,
                           String mail) throws Exception;
    public void updateUser(Users user);
    public boolean deleteUser(int userId) throws Exception;
    public boolean deleteUser(Users user) throws Exception;
    public List<Users> getAllUsers();
    public Users getUser(String mail) throws Exception;
    public Users getUser(int id);
    public boolean checkLogin(String mail, String password) throws Exception;
}
